home *** CD-ROM | disk | FTP | other *** search
- ;---------------------------------------------------------------
- ; SETFRAME: Sets the environment upon entry to a subroutine.
- ;
- SETFRAME MACRO
- PUSH BP ;SAVE FRAMEPOINTER ON STACK
- MOV BP,SP
- ENDM
- ;
- ; POPRET: Restores the BP register and returns to the
- ; calling FORTRAN routine after cleaning up the
- ; stack.
- ;
- POPRET MACRO NPARMS ;RETURN FROM SUBR. NPARMS=NUMBER OF PARMS
- POP BP
- RET NPARMS*4
- ENDM
- ;
- ; GETPARM: returns a pointer to a parameter in the call list.
- ;
- ; Operands: X = the number of the desired parameter
- ; MAX = the maximum number of parameters in
- ; the call list.
- ;
- ; Result: The ES:BX register pair points to the parameter.
- ;
- GETPARM MACRO X,MAX ;PARAMETER NUMBER (IE, 1,2,3)
- LES BX,DWORD PTR SS:[BP+(MAX-X)*4+6]
- ENDM
- ;
- ;
- ;--------------------------------------------------------------